﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Construction.Core
{
    public class nFloors: cObj
    {
        private double chieuDai;
        private double chieuRong;
        private double chieuDay;
        private string name;
        protected string id;

        public nFloors()
        { 
            
        }

        public double ChieuDai
        {
            set
            {
                if (!(this.chieuDai == value))
                {
                    this.chieuDai = value;
                    this.id = null;
                }
            }
            get
            {
                return this.chieuDai;
            }
        }

        public double ChieuRong
        {
            set
            {
                if (!(this.chieuRong == value))
                {
                    this.chieuRong = value;
                    this.id = null;
                }
            }
            get
            {
                return this.chieuRong;
            }
        }

        public double ChieuDay
        {
            set
            {
                if (!(this.chieuDay == value))
                {
                    this.chieuDay = value;
                    this.id = null;
                }
            }
            get
            {
                return this.chieuDay;
            }
        }

        public string Name
        {
            set
            {
                if (this.name != value)
                {
                    this.name = value;
                    this.id = null;
                }
            }
            get
            {
                return this.name;
            }
        }

        public string ID
        {
            get
            {
                if (this is nFloors)
                {
                    if (this.id == null)
                    {
                        this.id = Guid.NewGuid().ToString();
                        return id;
                    }
                }
                if (this.id == null)
                {
                    this.id = Guid.NewGuid().ToString();
                    return id;
                }
                return id;
            }
        }        
    }
}
